package com.flyan.game.motafx.core.event.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 事件监听器类型
 *
 * @author flyan
 * @version 1.0
 * @email flyan_by_chenu@sina.com
 * @since 2025/2/11
 */
@AllArgsConstructor
@Getter
public enum EventListenerTypeEnum {

    /* 移动到目标 */
    MOVE_TO_TARGET("move_to_target"),
    INTERACT("interact"),
    ;

    private final String code;

    public static EventListenerTypeEnum valueOfCode(String code) {
        for (EventListenerTypeEnum e : values()) {
            if (e.code.equals(code)) {
                return e;
            }
        }
        return null;
    }

}
